{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "4b17462b",
   "metadata": {},
   "outputs": [],
   "source": [
    "import datetime # 获取当前的日期对象"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "61960fee",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2022-11-10 10:23:11\n"
     ]
    }
   ],
   "source": [
    "date1 = datetime.datetime(year=2022,month=11,day=10,hour=10,minute=23,second=11)\n",
    "\n",
    "print(date1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "55bcdad5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "46.0\n"
     ]
    }
   ],
   "source": [
    "def median(num_list):\n",
    "    sorted_list = sorted(num_list)\n",
    "    n = len(num_list)\n",
    "    if n % 2 == 1:\n",
    "        return num_list[n // 2]\n",
    "    else:\n",
    "        return (num_list[n // 2 - 1] + num_list[n // 2]) / 2\n",
    "print(median([69, 124, -32, 217]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "b6fc402a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "96.5\n"
     ]
    }
   ],
   "source": [
    "import statistics\n",
    "print(statistics.median([69, 124, -32, 217]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "id": "55021c30",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "96.5\n"
     ]
    }
   ],
   "source": [
    "from statistics import median\n",
    "print(statistics.median([69, 124, -32, 217]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "defc9230",
   "metadata": {},
   "outputs": [],
   "source": [
    "import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "fafb1de0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime.date(2022, 9, 5)"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "datetime.date.today()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "bf4ed13f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "python path C:\\Users\\czx\\python666\\1\n",
      "python path E:\\2022PYTHON\\python39.zip\n"
     ]
    }
   ],
   "source": [
    "import sys\n",
    "paths=sys.path\n",
    "for path_m in paths:\n",
    "    if \"python\" in path_m:\n",
    "        print(\"python path\",path_m)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "45ae0fe8",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "5ff6ad1c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1662344532.4917169"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.time()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a85354c1",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
